/*
   ScannerControl.h
   
   Copyright (C) 2006 LinuxOne, Inc. <Republic of korea>

   This library is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1
   of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lessor General Public License for more details.

   You should have received a copy of the GNU Lessor General Public
   License along with this library; if not, write to the Free Software
   Foundation, inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

   Hyunjin Kim <mgc521@linuxone.co.kr>

   LinuxOne, Inc., hereby disclaims all copylight
   written by Hyunjin Kim, 20 December 2006
*/

#ifndef _BOOYO_POS_SCANNER_CONTROL_H_
#define _BOOYO_POS_SCANNER_CONTROL_H_

#include <BaseControl.h>
#include <BooyoPOSException.h>
#include <const/ScannerConst.h>
#include <services/ScannerService.h>

namespace booyopos
{

class CScanner : public CBaseControl, public CScannerConst
{
private:
	services::CScannerService *css;
public:
	CScanner();
	~CScanner();

	/* Capabilities */
	int GetCapPowerReporting() throw (CByException);
	bool GetCapStatisticsReporting() throw (CByException);
	bool GetCapUpdateStatistics() throw (CByException);
	bool GetCapCompareFirmwareVersion() throw (CByException);
	bool GetCapUpdateFirmware() throw (CByException);

	/* Properties */
	bool GetAutoDisable() throw (CByException);
	void SetAutoDisable(bool autoDisable) throw (CByException);
	int GetDataCount() throw (CByException);
	bool GetDataEventEnabled() throw (CByException);
	void SetDataEventEnabled(bool dataEventEnabled) throw (CByException);
	bool GetDecodeData() throw (CByException);
	void SetDecodeData(bool decodeData) throw (CByException);
	char* GetScanData() throw (CByException);
	char* GetScanDataLabel() throw (CByException);
	int GetScanDataType() throw (CByException);
	int GetPowerNotify() throw (CByException);
	void SetPowerNotify(int powerNotify) throw (CByException);
	int GetPowerState() throw (CByException);

	/* Method */
	void ClearInput() throw (CByException);
	void ClearInputProperties() throw (CByException);
	
	/* statistics */
	void ResetStatistics(std::string statisticsBuffer) throw (CByException);
	void RetrieveStatistics(std::string statisticsBuffer[]) throw (CByException);
	void UpdateStatistics(std::string statisticBuffer) throw (CByException);
	void CompareFirmwareVersion(std::string firmwareFileName, int* result) throw (CByException);
	void UpdateFirmware(std::string firmwareFileName) throw (CByException);

	/* Event Handling
	sigc::signal<void, int>DataEvent_signal() { return DataEvent; }
	sigc::signal<void, int, int, void*>DirectIOEvent_signal() { return DirectIOEvent; }
	sigc::signal<void, int, int, int, int>ErrorEvent_signal() { return ErrorEvent; }
	sigc::signal<void, int>StatusUpdateEvent_signal() { return StatusUpdateEvent; }
	*/
};

} // namespace booyopos

#endif // _BOOYO_POS_SCANNER_CONTROL_H_
